/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package queryTabel;

import bean.ProsesBean;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;

/**
 *
 * @author Yo
 */
public class test {

    public static void main(String[] args) {
        try {
            ProsesBean bn = new ProsesBean();
            ResultSet no = bn.cariNoPendafMAX();

            while (no.next()) {
                int np = no.getInt(1);
                System.out.println(np);

                ResultSet npendf = bn.noPendf(np);
                int jml = 0;
                while (npendf.next()) {
                    System.out.println(npendf.getInt(1));
                    jml++;

                    int i = 1;
                    if (jml == 1) {
                        int a = npendf.getInt(1) + i;
                        System.out.println(a);
                    }
                }
            }

        } catch (SQLException ex) {
            Logger.getLogger(test.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
}
